<?php
	include '../ini.php';
	include '../../libraries/xl_lien_he.php';
	$dt_xl_lien_he=new xl_lien_he;
	
	if (empty($_GET['ma']))
	{
		$_SESSION['type_msg'] = 'error';
		$_SESSION['msg'] = 'Lỗi! Dữ liệu không hợp lệ! Vui lòng kiểm tra lại!';	
		header('Location: '.$_SERVER['HTTP_REFERER']);
		exit;
	}
	$ma=$_GET['ma'];
	$lien_he=$dt_xl_lien_he->xem($ma);
	if($lien_he==NULL)
	{
		$_SESSION['type_msg'] = 'error';
		$_SESSION['msg'] = 'Lỗi! Mã không tồn tại! Vui lòng kiểm tra lại!';	
		header('Location: '.$_SERVER['HTTP_REFERER']);
		exit;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include'../widgets/js_css.php'?>
</head>
<body>
<div id="body-wrapper">
<!-- Wrapper for the radial gradient background -->

<?php include '../widgets/sidebar.php'?>
<div id="main-content"> <!-- Main Content Section with everything --> 
  <!--noscript--> 
  <!-- Page Head --> 
  <!-- End .shortcut-buttons-set -->
  
  <div class="clear"></div>
  <!-- End .clear -->
  
  <div class="content-box"><!-- Start Content Box -->
    
    <div class="content-box-header">
      <h3>Danh sách liên hệ</h3>
      <div class="clear"></div>
    </div>
    <!-- End .content-box-header -->
    
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
        <?php thong_bao()?>
        <!--form gui e-mail-->
        <form id="form_gui_email" action="tra_loi_sm.php" method="post">
          <div style="font-size:18px">
            <input type="hidden" name="ma"  value="<?php echo $lien_he['ma']?>"/>
            <p>
              <label>Chủ đề</label>
              <input style="width:450px" value="<?php echo $_SESSION['tieu_de']; $_SESSION['tieu_de']='';?>" type="text" name="tieu_de" class="text" />
            </p> 
            <p>
              <label>Nội Dung</label>
              <textarea class="text-input textarea" value="<?php echo $_SESSION['noi_dung']; $_SESSION['noi_dung']='';?>" id="noi_dung" name="noi_dung"></textarea>
              <script type="text/javascript">
                CKEDITOR.replace( 'noi_dung', {
                    skin : 'office2003',
                    toolbar : [
                                ['Font','FontSize','-','TextColor','BGColor'],
								['Bold','Italic','Underline','Strike','-','Subscript','Superscript','-','Undo','Redo'],
                                '/',
                                ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
                                ['Link','Unlink','Anchor','-','Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak']
                            ] 
                } );
            </script>
            </p>
            <p style="text-align:center">
              <input id="gui" class="button" type="submit" name="gui" value="Gửi" />
              <input id="huy" class="button" onclick="window.location='danh_sach.php';" type="button" name="huy" value="Hủy" />
            </p>
          </div>
        </form>
        <!--end gui e-mail --> 
      </div>
      <!-- End #tab1 --> 
      
    </div>
    <!-- End .content-box-content --> 
    
  </div>
  <!-- End .content-box -->
  
  <div class="clear"></div>
  <div id="footer"> <small> <!-- Remove this notice or replace it with whatever you want --> 
    <!-- End #footer --> 
    
  </div>
  <!-- End #main-content --> 
</div>
</body>
</html>
